﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility1;

namespace eDream.Page
{
    public partial class Dia_diem_lienket : System.Web.UI.UserControl
    {
        public string pathUrl = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            pathUrl = WebUtils.pathUrl();
            if (!IsPostBack)
                Bindata(rpt1, 1);
        }

        void Bindata(Repeater rpt, int groupId)
        {
            DataClasses1DataContext dx = new DataClasses1DataContext();
            try
            {
                dx.Connection.Open();
                var list = from k in dx.Product_tbs
                           where k.GroupID == groupId && k.trangchu == true && k.iflag == true
                           select new { k.ID, k.congty, k.iProName, k.image, k.ipronameSing, k.css, k.iSale, k.iDongiamoi, k.chuyenhang };
                rpt.DataSource = list;
                rpt.DataBind();
            }
            catch (Exception) { }
            finally { dx.Connection.Close(); }
        }
    }
}